home *** CD-ROM | disk | FTP | other *** search
/ Mac OS on the PowerPC Mic…rocessor - In Store Demo / Mac OS on the PowerPC Microprocessor.iso / MacOS / MacOS.dxr / 00046_index idle.ls < prev    next >
Encoding:
Text File  |  1996-05-13  |  4.0 KB  |  123 lines

  1. global gColor, glineoffset, gkeywordtext, glastline, gSelLine, objGrid
  2.  
  3. on exitFrame
  4.   go(the frame)
  5. end
  6.  
  7. on idle
  8.   mRollOver(objGrid)
  9.   repeat while rollOver(37)
  10.     if mouseDown() then
  11.       exit
  12.     end if
  13.     if glastline < 25 then
  14.       set mouseloc to (mouseV() - 95) / 12
  15.       if (mouseloc > 0) and (mouseloc <= glastline) then
  16.         set the visible of sprite 29 to 1
  17.         set the locV of sprite 29 to (mouseloc * 12) + 95
  18.         updateStage()
  19.       else
  20.         exit repeat
  21.       end if
  22.       next repeat
  23.     end if
  24.     set mouseloc to (mouseV() - 95) / 12
  25.     if (mouseloc > 1) and (mouseloc < 24) then
  26.       set the visible of sprite 29 to 1
  27.       set the locV of sprite 29 to (mouseloc * 12) + 95
  28.       updateStage()
  29.       next repeat
  30.     end if
  31.     if mouseloc = 1 then
  32.       set the visible of sprite 29 to 1
  33.       set the locV of sprite 29 to 107
  34.       updateStage()
  35.       if glineoffset = 1 then
  36.         if glastline = 25 then
  37.           set the visible of sprite 30 to 0
  38.           set the visible of sprite 31 to 1
  39.           put EMPTY into line 24 of field 34
  40.           delete line 23 of field 34
  41.           put line 1 to 2 of gkeywordtext into line 1 of field 34
  42.         else
  43.           set the visible of sprite 30 to 0
  44.           delete line 23 of field 34
  45.           put line 1 to 2 of gkeywordtext into line 1 of field 34
  46.         end if
  47.         if gSelLine = 1 then
  48.           set the foreColor of line 1 of cast 34 to getAt(gColor, 5)
  49.         else
  50.           if gSelLine = 2 then
  51.             set the foreColor of line 2 of cast 34 to getAt(gColor, 5)
  52.           end if
  53.         end if
  54.         set glineoffset to 0
  55.       else
  56.         if glineoffset > 1 then
  57.           if (glineoffset + 24) = glastline then
  58.             set the visible of sprite 31 to 1
  59.             put EMPTY into line 24 of field 34
  60.             delete line 23 of field 34
  61.             put RETURN & line glineoffset + 1 of gkeywordtext after line 1 of field 34
  62.           else
  63.             delete line 23 of field 34
  64.             put RETURN & line glineoffset + 1 of gkeywordtext after line 1 of field 34
  65.           end if
  66.           if (glineoffset + 1) = gSelLine then
  67.             set the foreColor of line 2 of cast 34 to getAt(gColor, 5)
  68.           end if
  69.           set glineoffset to glineoffset - 1
  70.         end if
  71.       end if
  72.       next repeat
  73.     end if
  74.     if mouseloc = 24 then
  75.       set the visible of sprite 29 to 1
  76.       set the locV of sprite 29 to 383
  77.       updateStage()
  78.       if (glineoffset + 25) = glastline then
  79.         if glineoffset = 0 then
  80.           set the visible of sprite 30 to 1
  81.           set the visible of sprite 31 to 0
  82.           put EMPTY into line 1 of field 34
  83.           delete line 2 of field 34
  84.           put line 24 to 25 of gkeywordtext into line 23 of field 34
  85.         else
  86.           set the visible of sprite 31 to 0
  87.           delete line 2 of field 34
  88.           put line glastline - 1 to glastline of gkeywordtext into line 23 of field 34
  89.         end if
  90.         if gSelLine = (glastline - 1) then
  91.           set the foreColor of line 23 of cast 34 to getAt(gColor, 5)
  92.         else
  93.           if gSelLine = glastline then
  94.             set the foreColor of line 24 of cast 34 to getAt(gColor, 5)
  95.           end if
  96.         end if
  97.         set glineoffset to glineoffset + 1
  98.         updateStage()
  99.         next repeat
  100.       end if
  101.       if (glineoffset + 25) < glastline then
  102.         if glineoffset = 0 then
  103.           set the visible of sprite 30 to 1
  104.           put EMPTY into line 1 of field 34
  105.           delete line 2 of field 34
  106.           put line 24 of gkeywordtext & RETURN before line 23 of field 34
  107.         else
  108.           delete line 2 of field 34
  109.           put line glineoffset + 24 of gkeywordtext & RETURN before line 23 of field 34
  110.         end if
  111.         if gSelLine = (glineoffset + 24) then
  112.           set the foreColor of line 23 of cast 34 to getAt(gColor, 5)
  113.         end if
  114.         set glineoffset to glineoffset + 1
  115.         updateStage()
  116.       end if
  117.     end if
  118.   end repeat
  119.   set the visible of sprite 29 to 0
  120.   updateStage()
  121.   dontPassEvent()
  122. end
  123.